<div class="content-below-toolbar">
	
	<div class="inner-content">
		
		<div class="breadcrumb">
			<a href="../../">Products</a>
			{if $product.parent}
				<a href="../{$product.parent.code}/">{$product.parent.code} - {$product.parent.title|escape:"html":"UTF-8"}</a>
				{$product.code}
			{else}
				{$product.code}
				{if $product.title}
				 	- <span id="breadcrumb_title">{$product.title|escape:"html":"UTF-8"}</span>
				{else}
					Add product
				{/if}
			{/if}
		</div>
				
		<p><label>Sub-products</label></p>
		
		<table class="table">
			<tr>
				<th>Product code</th>
				{foreach from="`$attributes`" item="attribute"}
					<th>
						{$attribute.title}
						<input type="text" name="attribute_sort[{$attribute.attribute_id}]" value="{$attribute.sort}" style="width:20px;text-align:center; padding: 2px; font-size:80%"/>
					</th>
				{/foreach}
			</tr>
			{foreach from="`$subproducts`" item="subproduct"}
			<tr class="{cycle values=",alt"}">
				<td><a href="/admin/shop/products/edit/{$subproduct.code}/">{$subproduct.code}</a></td>
				{foreach from="`$attributes`" item="attribute"}
					<td>{$subproduct.attributes[$attribute.attribute_id].value|@print_r:true}</td>
				{/foreach}
			</tr>
			{/foreach}
			<tr>
				<td>
					<label for="new_sub_product">New sub-product code</label>
					<input type="text" name="new_sub_product" value="" id="new_sub_product" style="width: 200px" /><br />
					<small>Save to add</small>
				</td>
			</tr>
			<tr>
				<td>
					<label for="new_attribute">New attribute</label>
					<input type="text" name="new_attribute" value="" id="new_attribute" style="width: 200px" /><br />
					<small>Save to add</small>
				</td>
			</tr>
		</table>
		
	</div>
</div>